package action_行为型.observer_pattern_观察者模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/09/16:45
 * @Description:
 */
public class AObServer extends ObServer {

	private final Subject subject;

	public AObServer(Subject subject) {
		this.subject = subject;
		this.subject.attachObServer(this);
	}

	@Override public void update() {
		int state = subject.getState();
		System.err.println("aobserver update.state : " + state);
	}
}
